package com.mytaobao.splash;

import com.baseproject.RxSubscriber;
import com.baseproject.datasource.get.procedure.DataProcedure;
import com.baseproject.mvp.MvpBasePresenter;
import com.mytaobao.requestlayer.AppRequest;

import org.json.JSONArray;

import java.util.List;

import static com.mytaobao.AppConfig.ConstUrl.KEY_ACTION;

/**
 * Created by hp on 2017/9/4.
 */

public class SplashPresenter extends MvpBasePresenter<SplashActivity> {

    @Override
    public void start() {
        subscriptions.add(AppRequest.getFirstTab(DataProcedure.createCommon(JSONArray.class).setQueryParams(getSimpleQueryParams(KEY_ACTION, "getFirstTabList"))
        .setIfShowProgressDialog(false))
                .subscribe(new RxSubscriber<List<JSONArray>>(getView()) {
                    @Override
                    public void _onNext(List<JSONArray> jsonArray) {

                    }
                }));
    }
}
